import {store,app} from '@/main';
import apiConfig from '../api-config';
export default (data,url,page)=>{
    var s ='token=';
    if(store&&store.getters&&store.getters.user){
        s+= store.getters.user.token+'';
    }
    for(let key in data){
        if(!page&&(key=='page_row'||key=='page_current'||key=='page_total')){
            continue
        }
        if(Array.isArray(data[key])){
            s+='&'+key+'='+data[key].join(',')
        }else {
            s+='&'+key+'='+data[key].toString();
        }
    }
    window.open( apiConfig.url + url+'?'+s);
}